package com.techstar.ats.codec;

import io.netty.buffer.ByteBuf;
import com.techstar.ats.dxp.AtsResponse;

public interface MessageDecoder<T extends AtsResponse> extends Decoder<T> {
	T create();

	default T get(ByteBuf buf) {
		T value = this.create();
		this.decode(buf, value);
		return value;
	}
}
